# RUN: tf-mlir-translate -graphdef-to-mlir -tf-enable-shape-inference-on-import=false %s -tf-input-arrays=input -tf-input-data-types=DT_FLOAT -tf-input-shapes='' -tf-output-arrays=out:1,out -o - | FileCheck %s

# Verify that we match correctly the input / output when they are scalar.

# CHECK-LABEL: func @main
# CHECK-SAME:  (%{{[a-z0-9]+}}: tensor<f32> {tf.device = "/device:CPU:0"})
# CHECK-SAME:  control_outputs = ""
# CHECK-SAME:  inputs = "input"
# CHECK-SAME:  outputs = "out:1,out"

# CHECK:           tf.Relu
# CHECK:           %[[IDENTITY:[a-z_0-9]+]]:2, {{.*}} = tf_executor.island wraps "tf.IdentityN"
# CHECK:           etch %[[IDENTITY]]#1, %[[IDENTITY]]#0

node {
  name: "input"
  op: "Placeholder"
  device: "/device:CPU:0"
  attr {
    key: "dtype"
    value {
      type: DT_FLOAT
    }
  }
  attr {
    key: "shape"
    value {
      shape {
        dim {
          size: 1
        }
      }
    }
  }
}
node {
  name: "Relu"
  op: "Relu"
  input: "input"
  device: "/device:CPU:0"
  attr {
    key: "T"
    value {
      type: DT_FLOAT
    }
  }
}
node {
  name: "out"
  op: "IdentityN"
  input: "Relu"
  input: "Relu"
  attr: {
    key: "T"
    value: {
      list: {
        type: DT_FLOAT
        type: DT_FLOAT
      }
    }
  }

}
versions {
  producer: 27
}
